<?php

namespace App\Plugins\Abstracts;

use App\Plugins\Interfaces\PluginRoutesInterface;
use Illuminate\Support\Facades\Route;

abstract class AppPluginRoutes implements PluginRoutesInterface
{
    protected $namespace;

    abstract function routes();

    public function register()
    {
        Route::group([
            'middleware' => ['api', 'auth:api', 'json', 'login'],
            'namespace' => $this->namespace,
            'prefix' => 'api/v1',
        ], function () {
            $this->routes();
        });
    }
}